//************************************************************
//    > File Name: unordered_map.cpp
//    > Author: davis
//    > Mail:  
//    > Created Time: 2017年03月16日 17:01:31
//***********************************************************

#include<bits/stdc++.h>
#include<string>
#include<unordered_map>
using namespace std;

int main()
{
	unordered_map<string, double> mymap={
		{"aa",1.23},
		{"bb",2.34},
		{"cc",3.45},
		{"dd",4.45},
		{"ee",5.45}
	};
	for(auto it =mymap.cbegin();it != mymap.cend();++it)
		cout<<" "<<it->first<<":"<<it->second;
	cout<<endl;


	if(mymap.count("bb"))
		cout<<"mymap has bb"<<endl;
	else
		cout<<"mymap has no bb"<<endl;

	unsigned int n=mymap.bucket_count();
	cout<<"mymsp has "<<n<<" buckets"<<endl;
}
